package com.zsrd.self.base.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zsrd.self.entity.SelfWxConfig;
import com.zsrd.self.service.SelfWxConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AliyunOSSConfiguration {




//    // 配置阿里云 OSS 访问密钥
//    private static final String accessKeyId = "LTAI5tJEdUWrhAcNngGX4ujH";
//    private static final String accessKeySecret = "0c7dbCyn2IPIWojvpjYFuenvM9nyIA";
//    // 配置 OSS 存储空间名称
//    private static final String bucketName = "sunxintest";
//    // 配置 OSS 访问终端
//    private static final String endpoint = "oss-cn-beijing.aliyuncs.com";




    // 创建阿里云 OSS 客户端
    public static OSS createOSSClient(String endpoint,String accessKeyId, String accessKeySecret) {
        return new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
    }
}
